﻿using PetaPoco;
using System.ComponentModel.DataAnnotations;

namespace Cxuu.Models
{
    [TableName("cxuu_config")]
    [PrimaryKey("Name", AutoIncrement = true)]
    public class Config
    {
        public string Name { get; set; }
        public string Data { get; set; }

    }


    public class EditConfigSiteInfo
    {

        [Display(Name = "网站名称")]
        [Required(ErrorMessage = "网站名称不能为空")]
        public string SiteName { get; set; }
        [Display(Name = "网站地址")]
        [Required(ErrorMessage = "网站地址不能为空")]
        public string SiteUrl { get; set; }
        [Display(Name = "网站描述")]
        [Required(ErrorMessage = "网站描述不能为空")]
        public string Description { get; set; }

        [Display(Name = "网站版权")]
        [Required(ErrorMessage = "网站版权不能为空")]
        public string Copyright { get; set; }
        [Display(Name = "备案号")]
        public string Beian { get; set; }


        [Display(Name = "上传目录 ")]
        public string BaseDir { get; set; }

        [Display(Name = "图片目录 ")]
        public string ImageDir { get; set; }

        [Display(Name = "图片大小")]

        public int ImageSize { get; set; }

        [Display(Name = "图片类型")]
        public string ImageExt { get; set; }

        [Display(Name = "文件目录 ")]
        public string FileDir { get; set; }

        [Display(Name = "文件类型")]
        public string FileExt { get; set; }

        [Display(Name = "文件大小")]

        public int FileSize { get; set; }
    }
}